<?php
/*
Module Group: mall
Module Group Name: 微商城
Description: 微商城用于购物
Version: 1.0
Iconurl: http://www.happyidea.com.cn/resource/wx_icon/default.png
Author: holiny
Modules: mall
Display: 1
*/

class purseModule extends Module {
	
	/*
	 * 在构造函数中装载所依赖的类或其他文件
	*/
	function __construct() {
		$this->includePhp('purse', 'purse');
	}
	/*
	 * 调用插件资源
	*/
	public function call($user, $method, $param) {
		switch ($method) {
            case 'scanCardcode':
                purse::scanCardcode($param);
                break;
            case 'scanedCode':
                purse::scanedCode($param);
                break;
            case 'index':
                $token=$param->token;
                purse::index($token);
                break;
            case 'getBill';
                purse::getBill();
                break;
            case 'getBillList':
                $start = $param->start;
                $limit = $param->limit;
                purse::getBillList($start,$limit);
                break;
            case 'setPayPassword':
                $password = $param->password;
                $tokens = $param->tokens;
                purse::setPayPassword($password, $tokens);
                break;
            case 'contrastPayPassword':
                $oldPassword = $param->oldPassword;
                $orderId = $param->orderId;
                purse::contrastPayPassword($oldPassword);
                break;
            case 'forgetPayPassword':
                $phone = $param->phone;
                purse::forgetPayPassword($phone);
                break;
            case 'contrastPhoneCode':
                $phone = $param->phone;
                $code = $param->code;
                purse::contrastPhoneCode($phone, $code);
                break;

		}
	}
}


$module = new purseModule();
Module::addModule($module);